import Accelermter from "./accelermeter"
import Attitude from "./attitude"
import Battery from "./battery"
import Compass from "./compass"
import Gyroscope from "./gyroscope"

export default class sensor {
  constructor(){
    this.device = {
      accelerometer : new Accelermter(),
      attitude : new Attitude(),
      battery : new Battery(),
      compass : new Compass(),
      gyroscope : new Gyroscope()
    }
  }
  enable(name,callback){
    this.device[name].start()
  }
  disable(name){
    this.device[name].stop()
  }
  setCallback(name,callbackName,callback){
    this.device[name][callbackName] = callback
  }
}